﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace ArkanoidX.UI
{
    public class MovingText : Text
    {
        public Vector2 Speed = Vector2.Zero;
        public float InflationRate = 1.0f;   /* the amount it grows per second
                                                * negative value for deflation */

        public MovingText(MainGame game) 
            : base(game)
        {
        }

        public override void Update(GameTime gameTime)
        {
            float timeInterval = (float)gameTime.ElapsedGameTime.TotalMilliseconds;
            Position.X += Speed.X * timeInterval;
            Position.Y += Speed.Y * timeInterval;

            _scale = new Vector2(_scale.X * (float)Math.Pow(InflationRate, timeInterval * 0.001f),
                _scale.Y * (float)Math.Pow(InflationRate, timeInterval * 0.001f));
            
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
        }

    }
}
